import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
    state: {
			networkShow:false,//网络请求状态
			informList:[],//通知
			},
    mutations: {
			switchNetwork(state,code=false){
				this.state.networkShow=code
			},
			setInformList(state,data){
				data.show=true
				let index=this.state.informList.length
				this.state.informList.push(data)
				setTimeout(()=>{
						this.state.informList[index].show=false		
				},6000)
			}
		},
    actions: {}
})
export default store